home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_troomnosee.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  93 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHS_TRoomNoSee.cog   Isolates Treasure room sectors for framerate.
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8.  
  9. symbols
  10.     
  11.     message    startup
  12.     message crossed
  13.     
  14.        surface FromHallOn              
  15.     surface FromHallOff               
  16.     surface FromTRoomOn                
  17.     surface FromTRoomOff    linkid=1
  18.     surface FromTRoomOff1    linkid=1    # where the waterfall is
  19.     
  20.     surface dark0                # make surface facing big nave
  21.     surface    dark1                  # dark or clear    to prevent smearing
  22.     
  23.     sector  HallSec
  24.     sector    FromTRoomSec         #  Area just before waterfall
  25.     sector    FromTRoomSec1
  26.  
  27.     int     player        local
  28.  
  29.    
  30.     
  31. end
  32.  
  33. code
  34.  
  35. startup:
  36.     
  37.     player=GetLocalPlayerThing();
  38.     SetSectorAdjoins(HallSec, 0);
  39.     SetSectorAdjoins(FromTRoomSec, 0);
  40.     SetSectorAdjoins(FromTRoomSec1, 0);
  41.     return;
  42.  
  43. crossed:
  44.     
  45.  
  46.     # make sure Indy player is sending message
  47.     If (GetSourceRef() != player) return;
  48.  
  49.     # draw sector
  50.     If (GetSenderRef() == FromHallOn)
  51.     {
  52.         SetSectorAdjoins(HallSec, 1);
  53.     }    
  54.     
  55.     If (GetSenderRef() == FromTRoomOn)
  56.     {
  57.         
  58.         SetSectorAdjoins(FromTRoomSec, 1);
  59.         SetSectorAdjoins(FromTRoomSec1, 1);
  60.         # Make surface clear
  61.         SetFaceGeoMode(dark0, 0);
  62.         SetFaceGeoMode(dark1, 0);
  63.     }    
  64.     
  65.        
  66.     # don't draw sector 
  67.         
  68.     If (GetSenderRef() == FromHallOff )
  69.     {
  70.            SetSectorAdjoins(HallSec, 0);
  71.     }
  72.     
  73.     If (GetSenderId() == 1)
  74.     {
  75.         
  76.         SetSectorAdjoins(FromTRoomSec, 0);
  77.         SetSectorAdjoins(FromTRoomSec1, 0);
  78.         # make surface dark
  79.         SetFaceGeoMode(dark0, 4);
  80.         SetFaceGeoMode(dark1, 4);
  81.     }    
  82.     
  83.     
  84.  
  85.     return;
  86.     
  87.  
  88.  
  89. end
  90.  
  91.  
  92.